package com.hzx.service.impl;

import com.hzx.dao.OrderMapper;
import com.hzx.pojo.Order;
import com.hzx.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImple implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public Integer insertBySelective(Order order) {
        return orderMapper.insertSelective(order);
    }

    @Override
    public Integer deleteById(Integer orderid) {
        return orderMapper.deleteByPrimaryKey(orderid);
    }

    @Override
   public  List selectOrderByUid(Integer uid) {
        return  orderMapper.selectOrderByUid(uid);

    }

    @Override
    public List getAllOrder() {
        return orderMapper.selectAll();
    }

    @Override
    public Integer selectIdBySelective(Order order) {
        return orderMapper.selectIdBySelective(order);
    }

    @Override
    public Order selectByid(Integer id) { return  orderMapper.selectByid(id); }

    @Override
    public  Integer updateByPrimaryKeySelective(Order order) {
        return  orderMapper.updateByPrimaryKeySelective(order);
    }

    @Override
    public  Integer selectOrderNum() {
        return  orderMapper.selectOrderNum();
    }

    @Override
    public  Integer updateOrderStatus(Integer id) {
        return  orderMapper.updateOrderStatus(id);
    }

    @Override
    public  Integer selectOrderTradeNum() {
        return orderMapper.selectOrderTradeNum();

    }


}
